#include<bits/stdc++.h>
using namespace std;
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#ifndef OVERFLOW 
#define OVERFLOW -2
#endif
#define MaxSize 50
typedef  int Status; 
typedef int ElemType;
//初始化
typedef struct{
	ElemType data[MaxSize];//数组存数据
	int top;//记录栈顶指针
}SqStack;
//初始化
void InitStack(SqStack &S){
	S.top = -1;
	
}
//站空
Status StackEmpty(SqStack &S){
	if(S.top == -1){
		return OK;
	}else{
		return ERROR;
	}
}
//入栈
Status Push(SqStack &S,ElemType x){
	if(S.top == MaxSize -1){
		return OVERFLOW;
	}
	S.data[++S.top] = x;
	return OK;
}
//出站
Status Pop(SqStack &S,ElemType &x){
	if(S.top == 1){
		return ERROR;
	}
	x = S.data[S.top--];
	return OK;
	
}
Status GetTop(SqStack &S,ElemType &x){
	if(S.top == -1){
		return ERROR;
	}
	x = S.data[S.top];

	return OK;	
}
int main(){
	
	return 0;
}
